/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Persistencia.Oracle;

import Persistencia.IBoletaSenasaDAO;
import Persistencia.DAOFactory;
import Persistencia.IExportadorDAO;
import Persistencia.IImportadorDAO;
import Persistencia.IPagoSenasaDAO;
import Persistencia.IResponsableDAO;
import Persistencia.IResponsableSenasaDAO;
import Persistencia.ISanitarioDAO;
import Persistencia.ITransporteDAO;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Administrador
 */
public  class OracleDAOFactory extends DAOFactory{
public static final String DRIVER = "oracle.jdbc.OracleDriver";
public static final String DBURL = "jdbc:oracle:thin:@192.168.1.35:1521:dboracle";

public static Connection getConnection() {


    try {
            Class.forName(DRIVER);
            return DriverManager.getConnection(DBURL, "zeta","31284081");
        } catch (SQLException ex) {
            ex.printStackTrace();
        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
        }

        return null;


}

    @Override
    public IExportadorDAO getExportadorDAO() {
        return  ExportadorOracleDAO.getInstance();
    }

    @Override
    public IImportadorDAO getImportadorDAO() {
       return  ImportadorOracleDAO.getInstance();

    }

    @Override
    public ITransporteDAO getTransporteDAO() {
        return  TransporteOracleDAO.getInstance();
    }

    @Override
    public IResponsableDAO getResponsableDAO() {
         return  ResponsableOracleDAO.getInstance();
    }

    @Override
    public IResponsableSenasaDAO getResponsableSenasaDAO() {
       return  ResponsableSenasaOracleDAO.getInstance();
    }

    @Override
    public IPagoSenasaDAO getPagoSenasaDAO() {
      return  PagoSenasaOracleDAO.getInstance();
    }

    @Override
    public IBoletaSenasaDAO getBoletaSenasaDAO() {
        return  BoletaSenasaOracleDAO.getInstance();
    }

    @Override
    public ISanitarioDAO getSanitarioDAO() {
        return SanitarioOracleDAO.getInstance();
    }

}
